c4e9b61ee2b9af6a38f1c756c269e135b43e45ec,source/org/jasig/portal/channels/CBookmarks.java,CBookmarks,renderNewBookmarkXML,#DocumentHandler#,329
Before Change
// for now, the best thing I can think of is creating an empty template, i.e. an empty
// bookmark and feeding it to the XSLT.
// Document doc=new DocumentImpl();
Element bookmark=getBookmarkXML ().createElement ("bookmark");
bookmark.setAttribute ("name","");
bookmark.setAttribute ("url","");
bookmark.setAttribute ("comments","");
XSLTInputSource stylesheet=runtimeData.getStylesheet ("editbookmark",set);
if (stylesheet!=null)
{
XSLTProcessor processor = XSLTProcessorFactory.getProcessor (new org.apache.xalan.xpath.xdom.XercesLiaison ());
processor.setStylesheetParam ("channelID",processor.createXString (staticData.getChannelID ()));
processor.setStylesheetParam ("newBookmark",processor.createXString ("true"));
processor.process (new XSLTInputSource (bookmark),stylesheet,new XSLTResultTarget (out));
}
else
Logger.log (Logger.ERROR,"BookmarksChannel::renderEditBookmarkXML() : unable to find a stylesheet for rendering");
After Change
private void renderDeleteNodeXML(DocumentHandler out)
throws org.xml.sax.SAXException
{
Hashtable parameters = new Hashtable(1);
if(m_activeNodeType == null)
{
Logger.log(Logger.ERROR, "CBookmarks.renderDeleteNodeXML: No active node type has been set");
renderViewModeXML(out);
}
else
if(m_activeNodeType.equals("bookmark"))
{
parameters.put("EditMode", "DeleteBookmark");
transformXML(out, "delete_node", getBookmarkXML(), parameters);
}
else
if(m_activeNodeType.equals("folder"))
{
parameters.put("EditMode", "DeleteFolder");
transformXML(out, "delete_node", getBookmarkXML(), parameters);
}
else